package com.yjhb.android.sbz.v2.activity

import com.yjhb.android.sbz.R
import com.yjhb.android.sbz.activity.BaseActivity
import com.yjhb.android.sbz.entity.SystemAnnouncement
import com.jojo.android.zxlib.base.mvp.BasePresenter
import com.jojo.android.zxlib.tool.ZxTimeTool
import kotlinx.android.synthetic.main.activity_notice_detail_v2.*


/**
 *  创建者 zx
 *  创建时间 2021/5/8 9:09
 */
class NoticeDetailActivity : BaseActivity<BasePresenter<*, *>>() {


    override fun initPresenter() = null

    override fun getLayoutId() = R.layout.activity_notice_detail_v2

    override fun initUI() {
        val notice = intent?.getSerializableExtra("notice") as SystemAnnouncement
        notice.let {
            title_tv?.text = it.tittle
            it.createTime?.let { time ->
                time1_tv?.text = ZxTimeTool.getDate(time.time, "yyyy-MM-dd")
                time2_tv?.text = ZxTimeTool.getDate(time.time, "yyyy-MM-dd")
            }
            content_tv.text = it.message
        }
    }

    override fun initData() {

    }

    override fun regEvent() {
        back?.setOnClickListener { finish() }
    }
}